//
//  UIView+UIFrame.m
//  彩票
//
//  Created by amos on 15/12/18.
//  Copyright © 2015年 itheima. All rights reserved.
//

#import "UIView+UIFrame.h"

@implementation UIView (UIFrame)

- (void)setX:(CGFloat)x
{
    CGRect frame = self.frame;

    frame.origin.x = x;

    self.frame = frame;
}
- (void)setY:(CGFloat)y
{
    CGRect frame = self.frame;

    frame.origin.y = y;

    self.frame = frame;
}
- (void)setWidth:(CGFloat)Width
{
    CGRect frame = self.frame;

    frame.size.width = Width;

    self.frame = frame;
}
- (void)setHeight:(CGFloat)height
{
    CGRect frame = self.frame;

    frame.size.height = height;

    self.frame = frame;
}

- (CGFloat)x
{
    CGRect frame = self.frame;

    return frame.origin.x;
}
- (CGFloat)y
{
    CGRect frame = self.frame;

    return frame.origin.y;
}
- (CGFloat)width
{
    CGRect frame = self.frame;

    return frame.size.width;
}
- (CGFloat)height
{
    CGRect frame = self.frame;

    return frame.size.height;
}

@end
